package com.base.syslib.view.wheelview.city.model;

import java.util.List;

public class ProvinceModel {
    private String code;
    private String region;
    private List<CityModel> regionEntityList;

    public ProvinceModel() {
        super();
    }

    public ProvinceModel(String code, String name, List<CityModel> cityList) {
        super();
        this.code = code;
        this.region = name;
        this.regionEntityList = cityList;
    }

    public String getCode() {
        if (code.length() > 2) {
            return code.substring(0, 2);
        }
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getRegion() {
        return region;
    }

    public void setRegion(String region) {
        this.region = region;
    }

    public List<CityModel> getRegionEntityList() {
        return regionEntityList;
    }

    public void setRegionEntityList(List<CityModel> regionEntityList) {
        this.regionEntityList = regionEntityList;
    }

    @Override
    public String toString() {
        return "ProvinceModel [name=" + region + ", cityList=" + regionEntityList + "]";
    }

}
